#ifndef CAUDIOCONTROL_H
#define CAUDIOCONTROL_H

#include <QObject>
#include <QMap>
#include "json_device_object.h"
#include "adapi.h"

class CVoiceObject
{
public:
    int _pid,_did,_floor;
    QString _name,_type,     // air , light ...
            _funtion,  // temp, wind, dim...
            _location;
    Json_DEVICE_OBJECT *_device;
};

class CAudioControl : public QObject
{
    Q_OBJECT
public:
    explicit CAudioControl(QObject *parent = 0);
    void insertDeviceObject(Json_DEVICE_OBJECT *device);
    void clearMap();
signals:
    void s_device_action(int did,QString action,QString value);

public slots:
    int doParseVoice(QByteArray json_array);
    int doParseAttention(QString word);

private:
    QMap<int,CVoiceObject *> _audioMap;
};

#endif // CAUDIOCONTROL_H
